<?php
namespace app\api\controller\xykeep;
use app\common\model\CardOrder as CardOrderModel;
use app\common\controller\Api;


/**
 * 权益卡订单
 */
class CardOrder extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /*
     * 权益卡列表
     */
    public function lists()
    {
        $lists = CardOrderModel::select();
        $this->success('权益卡列表',$lists);
    }


    //添加订单
    public function add()
    {
        $params = $this->request->post();
        $order = CardOrderModel::addOrder($params);
        $this->success('订单添加成功', $order);
    }

    public function detail()
    {
        $params = $this->request->post();
        $this->success('课程订单详情', CardOrderModel::getDetail($params));
    }
}